package com.dys.service.impl;

import com.dys.service.ICalculator;
import org.springframework.stereotype.Component;

/**
 * @Author: 疾风
 * @ClassName: CalculatorImpl
 * @Description: 接口实现类
 * @CreateDate: 2024/10/21
 * @Version: v1.0.0
 */
@Component
public class CalculatorImpl implements ICalculator {
    @Override
    public int add(int n1, int n2) {
        return n1+n2;
    }

    @Override
    public int subtract(int n1, int n2) {
        return n1-n2;
    }

    @Override
    public int multiply(int n1, int n2) {
        return n1*n2;
    }

    @Override
    public int divide(int n1, int n2) {
        return n1/n2;
    }
}
